Part Number Hot Search : 
GP1006 74HCT4 MAX821 SMBJ22A 01926 IRF7301 W91590L 7812A
Product Description
Full Text Search
 

To Download DS18B20P Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  1 of 26 020100 features  unique 1-wire tm interface requires only one port pin for communication  multidrop capability simplifies distributed temperature sensing applications  requires no external components  can be powered from data line. power supply range is 3.0v to 5.5v  zero standby power required  measures temperatures from -55c to +125c. fahrenheit equivalent is -67f to +257f  0.5 c accuracy from -10c to +85c  thermometer resolution is programmable from 9 to 12 bits  converts 12-bit temperature to digital word in 750 ms (max.)  user-definable, nonvolatile temperature alarm settings  alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)  applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive system pin assignment pin description gnd - ground dq - data in/out v dd - power supply voltage nc - no connect description the ds18b20 digital thermometer provides 9 to 12-bit (configurable) temperature readings which indicate the temperature of the device. information is sent to/from the ds18b20 over a 1-wire interface, so that only one wire (and ground) needs to be connected from a central microprocessor to a ds18b20. power for reading, writing, and performing temperature conversions can be derived from the data line itself with no need for an external power source. because each ds18b20 contains a unique silicon serial number, multiple ds18b20s can exist on the same 1-wire bus. this allows for placing temperature sensors in many different places. applications where this feature is useful include hvac environmental controls, sensing temperatures inside buildings, equipment or machinery, and process monitoring and control. ds18b20 programmable resolution 1-wire digital thermomete r www.dalsemi.com preliminary dallas ds1820 1 2 3 gnd dq vd 1 2 3 bottom view ds18b20 to-92 package 1 2 3 4 8 7 6 5 nc nc nc gn nc nc v dd dq ds18b20z 8-pin soic ( 150-mil ) DS18B20P tsoc nc d q v dd 1 2 3 4 6 5 gnd nc nc
ds18b20 2 of 26 detailed pin description table 1 pin tsoc pin 8pin soic pin to92 symbol description 1 5 1 gnd ground. 242dq data input/output pin. for 1-wire operation: open drain. (see ?parasite power? section.) 333v dd optional v dd pin. see ?parasite power? section for details of connection. v dd must be grounded for operation in parasite power mode. ds18b20z (8-pin soic) and ds18p20p (tsoc): all pins not specified in this table are not to be connected. overview the block diagram of figure 1 shows the major components of the ds18b20. the ds18b20 has four main data components: 1) 64-bit lasered rom, 2) temperature sensor, 3) nonvolatile temperature alarm triggers th and tl, and 4) a configuration register. the device derives its power from the 1-wire communication line by storing energy on an internal capacitor during periods of time when the signal line is high and continues to operate off this power source during the low times of the 1-wire line until it returns high to replenish the parasite (capacitor) supply. as an alternative, the ds18b20 may also be powered from an external 3v - 5.5v supply. communication to the ds18b20 is via a 1-wire port. with the 1-wire port, the memory and control functions will not be available before the rom function protocol has been established. the master must first provide one of five rom function commands: 1) read rom, 2) match rom, 3) search rom, 4) skip rom, or 5) alarm search. these commands operate on the 64-bit lasered rom portion of each device and can single out a specific device if many are present on the 1-wire line as well as indicate to the bus master how many and what types of devices are present. after a rom function sequence has been successfully executed, the memory and control functions are accessible and the master may then provide any one of the six memory and control function commands. one control function command instructs the ds18b20 to perform a temperature measurement. the result of this measurement will be placed in the ds18b20?s scratch-pad memory, and may be read by issuing a memory function command which reads the contents of the scratchpad memory. the temperature alarm triggers th and tl consist of 1 byte eeprom each. if the alarm search command is not applied to the ds18b20, these registers may be used as general purpose user memory. the scratchpad also contains a configuration byte to set the desired resolution of the temperature to digital conversion. writing th, tl, and the configuration byte is done using a memory function command. read access to these registers is through the scratchpad. all data is read and written least significant bit first.
ds18b20 3 of 26 ds18b20 block diagram figure 1 parasite power the block diagram (figure 1) shows the parasite-powered circuitry. this circuitry ?steals? power whenever the dq or v dd pins are high. dq will provide sufficient power as long as the specified timing and voltage requirements are met (see the section titled ?1-wire bus system?). the advantages of parasite power are twofold: 1) by parasiting off this pin, no local power source is needed for remote sensing of temperature, and 2) the rom may be read in absence of normal power. in order for the ds18b20 to be able to perform accurate temperature conversions, sufficient power must be provided over the dq line when a temperature conversion is taking place. since the operating current of the ds18b20 is up to 1.5 ma, the dq line will not have sufficient drive due to the 5k pullup resistor. this problem is particularly acute if several ds18b20s are on the same dq and attempting to convert simultaneously. there are two ways to assure that the ds18b20 has sufficient supply current during its active conversion cycle. the first is to provide a strong pullup on the dq line whenever temperature conversions or copies to the e 2 memory are taking place. this may be accomplished by using a mosfet to pull the dq line directly to the power supply as shown in figure 2. the dq line must be switched over to the strong pull- up within 10 s maximum after issuing any protocol that involves copying to the e 2 memory or initiates temperature conversions. when using the parasite power mode, the v dd pin must be tied to ground. another method of supplying current to the ds18b20 is through the use of an external power supply tied to the v dd pin, as shown in figure 3. the advantage to this is that the strong pullup is not required on the dq line, and the bus master need not be tied up holding that line high during temperature conversions. this allows other data traffic on the 1-wire bus during the conversion time. in addition, any number of ds18b20s may be placed on the 1-wire bus, and if they all use external power, they may all simultaneously perform temperature conversions by issuing the skip rom command and then issuing the convert t command. note that as long as the external power supply is active, the gnd pin may not be floating. the use of parasite power is not recommended above 100 c, since it may not be able to sustain communications given the higher leakage currents the ds18b20 exhibits at these temperatures. for 64-bit rom and 1-wire port memory and control logic scratchpad 8-bit crc g enerat o r temperature sensor high temperature trigger, th low temperature trigger, tl configuration register power supply sense internal v dd dq v dd
ds18b20 4 of 26 applications in which such temperatures are likely, it is strongly recommended that v dd be applied to the ds18b20. for situations where the bus master does not know whether the ds18b20s on the bus are parasite powered or supplied with external v dd , a provision is made in the ds18b20 to signal the power supply scheme used. the bus master can determine if any ds18b20s are on the bus which require the strong pullup by sending a skip rom protocol, then issuing the read power supply command. after this command is issued, the master then issues read time slots. the ds18b20 will send back ?0? on the 1- wire bus if it is parasite powered; it will send back a ?1? if it is powered from the v dd pin. if the master receives a ?0,? it knows that it must supply the strong pullup on the dq line during temperature conversions. see ?memory command functions? section for more detail on this command protocol. strong pullup for supplying ds18b20 during temperature conversion figure 2 using v dd to supply temperature conversion current figure 3 p +3v - +5.5v +3v - +5.5v ds18b20 gnd v dd i/o 4.7k p ds18b20 v dd i/o +3v - +5.5v 4.7k external +3v - +5.5v supply to other 1-wire devices
ds18b20 5 of 26 operation - measuring temperature the core functionality of the ds18b20 is its direct-to-digital temperature sensor. the resolution of the ds18b20 is configurable (9, 10, 11, or 12 bits), with 12-bit readings the factory default state. this equates to a temperature resolution of 0.5 c, 0.25 c, 0.125 c, or 0.0625 c. following the issuance of the convert t [44h] command, a temperature conversion is performed and the thermal data is stored in the scratchpad memory in a 16-bit, sign-extended two?s complement format. the temperature information can be retrieved over the 1-wire? interface by issuing a read scratchpad [beh] command once the conversion has been performed. the data is transferred over the 1-wire? bus, lsb first. the msb of the temperature register contains the ?sign? (s) bit, denoting whether the temperature is positive or negative. table 2 describes the exact relationship of output data to measured temperature. the table assumes 12-bit resolution. if the ds18b20 is configured for a lower resolution, insignificant bits will contain zeros. for fahrenheit usage, a lookup table or conversion routine must be used. temperature/data relationships table 2 2 3 2 2 2 1 2 0 2 -1 2 -2 2 -3 2 -4 lsb msb (unit = c) lsb sssss2 6 2 5 2 4 msb temperature digital output (binary) digital output (hex) +125c 0000 0111 1101 0000 07d0h +85c 0000 0101 0101 0000 0550h* +25.0625c 0000 0001 1001 0001 0191h +10.125c 0000 0000 1010 0010 00a2h +0.5c 0000 0000 0000 1000 0008h 0c 0000 0000 0000 0000 0000h -0.5c 1111 1111 1111 1000 fff8h -10.125c 1111 1111 0101 1110 ff5eh -25.0625c 1111 1110 0110 1111 ff6fh -55c 1111 1100 1001 0000 fc90h *the power on reset register value is +85c. operation - alarm signaling after the ds18b20 has performed a temperature conversion, the temperature value is compared to the trigger values stored in th and tl. since these registers are 8-bit only, bits 9-12 are ignored for comparison. the most significant bit of th or tl directly corresponds to the sign bit of the 16-bit temperature register. if the result of a temperature measurement is higher than th or lower than tl, an alarm flag inside the device is set. this flag is updated with every temperature measurement. as long as the alarm flag is set, the ds18b20 will respond to the alarm search command. this allows many ds18b20s to be connected in parallel doing simultaneous temperature measurements. if somewhere the temperature exceeds the limits, the alarming device(s) can be identified and read immediately without having to read non-alarming devices.
ds18b20 6 of 26 64-bit lasered rom each ds18b20 contains a unique rom code that is 64-bits long. the first 8 bits are a 1-wire family code (ds18b20 code is 28h). the next 48 bits are a unique serial number. the last 8 bits are a crc of the first 56 bits. (see figure 4.) the 64-bit rom and rom function control section allow the ds18b20 to operate as a 1-wire device and follow the 1-wire protocol detailed in the section ?1-wire bus system.? the functions required to control sections of the ds18b20 are not accessible until the rom function protocol has been satisfied. this protocol is described in the rom function protocol flowchart (figure 5). the 1-wire bus master must first provide one of five rom function commands: 1) read rom, 2) match rom, 3) search rom, 4) skip rom, or 5) alarm search. after a rom function sequence has been successfully executed, the functions specific to the ds18b20 are accessible and the bus master may then provide one of the six memory and control function commands. crc generation the ds18b20 has an 8-bit crc stored in the most significant byte of the 64-bit rom. the bus master can compute a crc value from the first 56-bits of the 64-bit rom and compare it to the value stored within the ds18b20 to determine if the rom data has been received error-free by the bus master. the equivalent polynomial function of this crc is: crc = x 8 + x 5 + x 4 + 1 the ds18b20 also generates an 8-bit crc value using the same polynomial function shown above and provides this value to the bus master to validate the transfer of data bytes. in each case where a crc is used for data transfer validation, the bus master must calculate a crc value using the polynomial function given above and compare the calculated value to either the 8-bit crc value stored in the 64-bit rom portion of the ds18b20 (for rom reads) or the 8-bit crc value computed within the ds18b20 (which is read as a ninth byte when the scratchpad is read). the comparison of crc values and decision to continue with an operation are determined entirely by the bus master. there is no circuitry inside the ds18b20 that prevents a command sequence from proceeding if the crc stored in or calculated by the ds18b20 does not match the value generated by the bus master. the 1-wire crc can be generated using a polynomial generator consisting of a shift register and xor gates as shown in figure 6. additional information about the dallas 1-wire cyclic redundancy check is available in application note 27 entitled ?understanding and using cyclic redundancy checks with dallas semiconductor touch memory products.? the shift register bits are initialized to 0. then starting with the least significant bit of the family code, 1 bit at a time is shifted in. after the eighth bit of the family code has been entered, then the serial number is entered. after the 48 th bit of the serial number has been entered, the shift register contains the crc value. shifting in the 8 bits of crc should return the shift register to all 0s. 64-bit lasered rom figure 4 8-bit crc code 48-bit serial number 8-bit family code (28h) msb lsb msb lsb msb lsb
ds18b20 7 of 26 rom functions flow chart figure 5
ds18b20 8 of 26 1-wire crc code figure 6 memory the ds18b20?s memory is organized as shown in figure 8. the memory consists of a scratchpad ram and a nonvolatile, electrically erasable (e 2 ) ram, which stores the high and low temperature triggers th and tl, and the configuration register. the scratchpad helps insure data integrity when communicating over the 1-wire bus. data is first written to the scratchpad using the write scratchpad [4eh] command. it can then be verified by using the read scratchpad [beh] command. after the data has been verified, a copy scratchpad [48h] command will transfer the data to the nonvolatile (e 2 ) ram. this process insures data integrity when modifying memory. the scratchpad is organized as eight bytes of memory. the first two bytes contain the lsb and the msb of the measured temperature information, respectively. the third and fourth bytes are volatile copies of th and tl and are refreshed with every power-on reset. the fifth byte is a volatile copy of the configuration register and is refreshed with every power-on reset. the configuration register will be explained in more detail later in this section of the datasheet. the sixth, seventh, and eighth bytes are used for internal computations, and thus will not read out any predictable pattern. it is imperative that one writes th, tl, and config in succession; i.e. a write is not valid if one writes only to th and tl, for example, and then issues a reset. if any of these bytes must be written, all three must be written before a reset is issued. there is a ninth byte which may be read with a read scratchpad [beh] command. this byte contains a cyclic redundancy check (crc) byte which is the crc over all of the eight previous bytes. this crc is implemented in the fashion described in the section titled ?crc generation?. configuration register the fifth byte of the scratchpad memory is the configuration register. it contains information which will be used by the device to determine the resolution of the temperature to digital conversion. the bits are organized as shown in figure 7. ds18b20 configuration register figure 7 0r1r0111 1 1 msb lsb bits 0-4 are don?t cares on a write but will always read out ?1?. bit 7 is a don?t care on a write but will always read out ?0?. ( msb ) xor xor xor ( lsb ) input
ds18b20 9 of 26 r0, r1: thermometer resolution bits. table 3 below defines the resolution of the digital thermometer, based on the settings of these two bits. there is a direct tradeoff between resolution and conversion time, as depicted in the ac electrical characteristics. the factory default of these eeprom bits is r0=1 and r1=1 (12-bit conversions). thermometer resolution configuration table 3 r1 r0 thermometer resolution max conversion time 0 0 9-bit 93.75ms (t conv /8) 0 1 10-bit 187.5ms (t conv /4) 1 0 11-bit 375ms (t conv /2) 1 1 12-bit 750ms (t conv ) ds18b20 memory map figure 8 temperature lsb temperature msb th/user byte 1 tl/user byte 2 config reserved reserved crc th/user byte 1 tl/user byte 2 reserved scratchpad byte 0 1 2 3 4 5 6 7 8 e 2 ram config
ds18b20 10 of 26 1-wire bus system the 1-wire bus is a system which has a single bus master and one or more slaves. the ds18b20 behaves as a slave. the discussion of this bus system is broken down into three topics: hardware configuration, transaction sequence, and 1-wire signaling (signal types and timing). hardware configuration the 1-wire bus has only a single line by definition; it is important that each device on the bus be able to drive it at the appropriate time. to facilitate this, each device attached to the 1-wire bus must have open drain or 3-state outputs. the 1-wire port of the ds18b20 (dq pin) is open drain with an internal circuit equivalent to that shown in figure 9. a multidrop bus consists of a 1-wire bus with multiple slaves attached. the 1-wire bus requires a pullup resistor of approximately 5k ? . hardware configuration figure 9 the idle state for the 1-wire bus is high. if for any reason a transaction needs to be suspended, the bus must be left in the idle state if the transaction is to resume. infinite recovery time can occur between bits so long as the 1-wire bus is in the inactive (high) state during the recovery period. if this does not occur and the bus is left low for more than 480 s, all components on the bus will be reset. transaction sequence the protocol for accessing the ds18b20 via the 1-wire port is as follows:  initialization  rom function command  memory function command  transaction/data +3v - +5v 4.7k bus master r x t x ds18b20 1-wire port 5 a t yp . r x t x 100 ohm m os fet r x = receive t x = transmit
ds18b20 11 of 26 initialization all transactions on the 1-wire bus begin with an initialization sequence. the initialization sequence consists of a reset pulse transmitted by the bus master followed by presence pulse(s) transmitted by the slave(s). the presence pulse lets the bus master know that the ds18b20 is on the bus and is ready to operate. for more details, see the ?1-wire signaling? section. rom function commands once the bus master has detected a presence, it can issue one of the five rom function commands. all rom function commands are 8 bits long. a list of these commands follows (refer to flowchart in figure 5): read rom [33h] this command allows the bus master to read the ds18b20?s 8-bit family code, unique 48-bit serial number, and 8-bit crc. this command can only be used if there is a single ds18b20 on the bus. if more than one slave is present on the bus, a data collision will occur when all slaves try to transmit at the same time (open drain will produce a wired and result). match rom [55h] the match rom command, followed by a 64-bit rom sequence, allows the bus master to address a specific ds18b20 on a multidrop bus. only the ds18b20 that exactly matches the 64-bit rom sequence will respond to the following memory function command. all slaves that do not match the 64-bit rom sequence will wait for a reset pulse. this command can be used with a single or multiple devices on the bus. skip rom [cch] this command can save time in a single drop bus system by allowing the bus master to access the memory functions without providing the 64-bit rom code. if more than one slave is present on the bus and a read command is issued following the skip rom command, data collision will occur on the bus as multiple slaves transmit simultaneously (open drain pulldowns will produce a wired and result). search rom [f0h] when a system is initially brought up, the bus master might not know the number of devices on the 1- wire bus or their 64-bit rom codes. the search rom command allows the bus master to use a process of elimination to identify the 64-bit rom codes of all slave devices on the bus. alarm search [ech] the flowchart of this command is identical to the search rom command. however, the ds18b20 will respond to this command only if an alarm condition has been encountered at the last temperature measurement. an alarm condition is defined as a temperature higher than th or lower than tl. the alarm condition remains set as long as the ds18b20 is powered up, or until another temperature measurement reveals a non-alarming value. for alarming, the trigger values stored in eeprom are taken into account. if an alarm condition exists and the th or tl settings are changed, another temperature conversion should be done to validate any alarm conditions.
ds18b20 12 of 26 example of a rom search the rom search process is the repetition of a simple three-step routine: read a bit, read the complement of the bit, then write the desired value of that bit. the bus master performs this simple, three-step routine on each bit of the rom. after one complete pass, the bus master knows the contents of the rom in one device. the remaining number of devices and their rom codes may be identified by additional passes. the following example of the rom search process assumes four different devices are connected to the same 1-wire bus. the rom data of the four devices is as shown: rom1 00110101... rom2 10101010... rom3 11110101... rom4 00010001... the search process is as follows: 1. the bus master begins the initialization sequence by issuing a reset pulse. the slave devices respond by issuing simultaneous presence pulses. 2. the bus master will then issue the search rom command on the 1-wire bus. 3. the bus master reads a bit from the 1-wire bus. each device will respond by placing the value of the first bit of their respective rom data onto the 1-wire bus. rom1 and rom4 will place a 0 onto the 1-wire bus, i.e., pull it low. rom2 and rom3 will place a 1 onto the 1-wire bus by allowing the line to stay high. the result is the logical and of all devices on the line, therefore the bus master sees a 0. the bus master reads another bit. since the search rom data command is being executed, all of the devices on the 1-wire bus respond to this second read by placing the complement of the first bit of their respective rom data onto the 1-wire bus. rom1 and rom4 will place a 1 onto the 1-wire, allowing the line to stay high. rom2 and rom3 will place a 0 onto the 1-wire, thus it will be pulled low. the bus master again observes a 0 for the complement of the first rom data bit. the bus master has determined that there are some devices on the 1-wire bus that have a 0 in the first position and others that have a 1. the data obtained from the two reads of the three-step routine have the following interpretations: 00 there are still devices attached which have conflicting bits in this position. 01 all devices still coupled have a 0-bit in this bit position. 10 all devices still coupled have a 1-bit in this bit position. 11 there are no devices attached to the 1-wire bus. 4. the bus master writes a 0. this deselects rom2 and rom3 for the remainder of this search pass, leaving only rom1 and rom4 connected to the 1-wire bus. 5. the bus master performs two more reads and receives a 0-bit followed by a 1-bit. this indicates that all devices still coupled to the bus have 0s as their second rom data bit. 6. the bus master then writes a 0 to keep both rom1 and rom4 coupled. 7. the bus master executes two reads and receives two 0-bits. this indicates that both 1-bits and 0-bits exist as the third bit of the rom data of the attached devices.
ds18b20 13 of 26 8. the bus master writes a 0-bit. this deselects rom1, leaving rom4 as the only device still connected. 9. the bus master reads the remainder of the rom bits for rom4 and continues to access the part if desired. this completes the first pass and uniquely identifies one part on the 1-wire bus. 10. the bus master starts a new rom search sequence by repeating steps 1 through 7. 11. the bus master writes a 1-bit. this decouples rom4, leaving only rom1 still coupled. 12. the bus master reads the remainder of the rom bits for rom1 and communicates to the underlying logic if desired. this completes the second rom search pass, in which another of the roms was found. 13. the bus master starts a new rom search by repeating steps 1 through 3. 14. the bus master writes a 1-bit. this deselects rom1 and rom4 for the remainder of this search pass, leaving only rom2 and rom3 coupled to the system. 15. the bus master executes two read time slots and receives two 0s. 16. the bus master writes a 0-bit. this decouples rom3 leaving only rom2. 17. the bus master reads the remainder of the rom bits for rom2 and communicates to the underlying logic if desired. this completes the third rom search pass, in which another of the roms was found. 18. the bus master starts a new rom search by repeating steps 13 through 15. 19. the bus master writes a 1-bit. this decouples rom2, leaving only rom3. 20. the bus master reads the remainder of the rom bits for rom3 and communicates to the underlying logic if desired. this completes the fourth rom search pass, in which another of the roms was found. note the following: the bus master learns the unique id number (rom data pattern) of one 1-wire device on each rom search operation. the time required to derive the part?s unique rom code is: 960 s + (8 + 3 x 64) 61 s = 13.16 ms the bus master is therefore capable of identifying 75 different 1-wire devices per second. i/o signaling the ds18b20 requires strict protocols to insure data integrity. the protocol consists of several types of signaling on one line: reset pulse, presence pulse, write 0, write 1, read 0, and read 1. all of these signals, with the exception of the presence pulse, are initiated by the bus master. the initialization sequence required to begin any communication with the ds18b20 is shown in figure 11. a reset pulse followed by a presence pulse indicates the ds18b20 is ready to send or receive data given the correct rom command and memory function command.
ds18b20 14 of 26 the bus master transmits (tx) a reset pulse (a low signal for a minimum of 480 s). the bus master then releases the line and goes into a receive mode (rx). the 1-wire bus is pulled to a high state via the 5k pullup resistor. after detecting the rising edge on the dq pin, the ds18b20 waits 15-60 s and then transmits the presence pulse (a low signal for 60-240 s). memory command functions the following command protocols are summarized in table 4, and by the flowchart of figure 10. write scratchpad [4eh] this command writes to the scratchpad of the ds18b20, starting at the th register. the next three bytes written will be saved in scratchpad memory at address locations 2 through 4. all three bytes must be written before a reset is issued. read scratchpad [beh] this command reads the contents of the scratchpad. reading will commence at byte 0 and will continue through the scratchpad until the 9 th (byte 8, crc) byte is read. if not all locations are to be read, the master may issue a reset to terminate reading at any time. copy scratchpad [48h] this command copies the scratchpad into the e 2 memory of the ds18b20, storing the temperature trigger bytes in nonvolatile memory. if the bus master issues read time slots following this command, the ds18b20 will output 0 on the bus as long as it is busy copying the scratchpad to e 2 ; it will return a 1 when the copy process is complete. if parasite-powered, the bus master has to enable a strong pullup for at least 10 ms immediately after issuing this command. convert t [44h] this command begins a temperature conversion. no further data is required. the temperature conversion will be performed and then the ds18b20 will remain idle. if the bus master issues read time slots following this command, the ds18b20 will output 0 on the bus as long as it is busy making a temperature conversion; it will return a 1 when the temperature conversion is complete. if parasite-powered, the bus master has to enable a strong pullup for a period greater than t conv immediately after issuing this command. recall e2 [b8h] this command recalls the temperature trigger values and configuration register stored in e 2 to the scratchpad. this recall operation happens automatically upon power-up to the ds18b20 as well, so valid data is available in the scratchpad as soon as the device has power applied. with every read data time slot issued after this command has been sent, the device will output its temperature converter busy flag: 0=busy, 1=ready. read power supply [b4h] with every read data time slot issued after this command has been sent to the ds18b20, the device will signal its power mode: 0=parasite power, 1=external power supply provided.
ds18b20 15 of 26 memory functions flow chart figure 10
ds18b20 16 of 26 memory functions flow chart figure 10 (cont?d)
ds18b20 17 of 26 memory functions flow chart figure 10 (cont?d)
ds18b20 18 of 26 initialization procedure ?reset and presence pulses? figure 11 ds18b20 command set table 4 instruction description protocol 1-wire bus after issuing protocol notes temperature conversion commands convert t initiates temperature conversion. 44h 1 memory commands read scratchpad reads bytes from scratchpad and reads crc byte. beh write scratchpad writes bytes into scratchpad at addresses 2 through 4 (th and tl temperature triggers and config). 4eh 3 copy scratchpad copies scratchpad into nonvolatile memory (addresses 2 through 4 only). 48h 2 recall e 2 recalls values stored in nonvolatile memory into scratchpad (temperature triggers). b8h read power supply signals the mode of ds18b20 power supply to the master. b4h
ds18b20 19 of 26 notes: 1. temperature conversion takes up to 750 ms. after receiving the convert t protocol, if the part does not receive power from the v dd pin, the dq line for the ds18b20 must be held high for at least a period greater than t conv to provide power during the conversion process. as such, no other activity may take place on the 1-wire bus for at least this period after a convert t command has been issued. 2. after receiving the copy scratchpad protocol, if the part does not receive power from the v dd pin, the dq line for the ds18b20 must be held high for at least 10 ms to provide power during the copy process. as such, no other activity may take place on the 1-wire bus for at least this period after a copy scratchpad command has been issued. 3. all three bytes must be written before a reset is issued. read/write time slots ds18b20 data is read and written through the use of time slots to manipulate bits and a command word to specify the transaction. write time slots a write time slot is initiated when the host pulls the data line from a high logic level to a low logic level. there are two types of write time slots: write 1 time slots and write 0 time slots. all write time slots must be a minimum of 60 s in duration with a minimum of a 1- s recovery time between individual write cycles. the ds18b20 samples the dq line in a window of 15 s to 60 s after the dq line falls. if the line is high, a write 1 occurs. if the line is low, a write 0 occurs (see figure 12). for the host to generate a write 1 time slot, the data line must be pulled to a logic low level and then released, allowing the data line to pull up to a high level within 15 s after the start of the write time slot. for the host to generate a write 0 time slot, the data line must be pulled to a logic low level and remain low for 60 s. read time slots the host generates read time slots when data is to be read from the ds18b20. a read time slot is initiated when the host pulls the data line from a logic high level to logic low level. the data line must remain at a low logic level for a minimum of 1 s; output data from the ds18b20 is valid for 15 s after the falling edge of the read time slot. the host therefore must stop driving the dq pin low in order to read its state 15 s from the start of the read slot (see figure 12). by the end of the read time slot, the dq pin will pull back high via the external pullup resistor. all read time slots must be a minimum of 60 s in duration with a minimum of a 1- s recovery time between individual read slots. figure 12 shows that the sum of t init , t rc , and t sample must be less than 15 s. figure 14 shows that system timing margin is maximized by keeping t init and t rc as small as possible and by locating the master sample time towards the end of the 15- s period.
ds18b20 20 of 26 read/write timing diagram figure 12
ds18b20 21 of 26 detailed master read 1 timing figure 13 recommended master read 1 timing figure 14
ds18b20 22 of 26 related application notes the following application notes can be applied to the ds18b20. these notes can be obtained from the dallas semiconductor ?application note book,? via our website at http://www.dalsemi.com/ , or through our faxback service at (214) 450-0441. application note 27: ?understanding and using cyclic redundancy checks with dallas semiconductor touch memory product? application note 55: ?extending the contact range of touch memories? application note 74: ?reading and writing touch memories via serial interfaces? application note 104: ?minimalist temperature control demo? application note 106: ?complex microlans? application note 108: ?microlan - in the long run? sample 1-wire subroutines that can be used in conjunction with an74 can be downloaded from the website or our anonymous ftp site. memory function example table 5 example: bus master initiates temperature conversion, then reads temperature (parasite power assumed). master mode data (lsb first) comments tx reset reset pulse (480-960 s). rx presence presence pulse. tx 55h issue ?match rom? command. tx <64-bit rom code> issue address for ds18b20. tx 44h issue ? convert t? command. tx i/o line is held high for at least a period of time greater than t conv by bus master to allow conversion to complete. tx reset reset pulse. rx presence presence pulse. tx 55h issue ?match rom? command. tx <64-bit rom code> issue address for ds18b20. tx beh issue ?read scratchpad? command. rx <9 data bytes> read entire scratchpad plus crc; the master now recalculates the crc of the eight data bytes received from the scratchpad, compares the crc calculated and the crc read. if they match, the master continues; if not, this read operation is repeated. tx reset reset pulse. rx presence presence pulse, done.
ds18b20 23 of 26 memory function example table 6 example: bus master writes memory (parasite power and only one ds18b20 assumed). master mode data (lsb first) comments tx reset reset pulse. rx presence presence pulse. tx cch skip rom command. tx 4eh write scratchpad command. tx <3 data bytes> writes three bytes to scratchpad (th, tl, and config). tx reset reset pulse. rx presence presence pulse. tx cch skip rom command. tx beh read scratchpad command. rx <9 data bytes> read entire scratchpad plus crc. the master now recalculates the crc of the eight data bytes received from the scratchpad, compares the crc and the two other bytes read back from the scratchpad. if data match, the master continues; if not, repeat the sequence. tx reset reset pulse. rx presence presence pulse. tx cch skip rom command. tx 48h copy scratchpad command; after issuing this command, the master must wait 10 ms for copy operation to complete. tx reset reset pulse. rx presence presence pulse, done.
ds18b20 24 of 26 absolute maximum ratings* voltage on any pin relative to ground -0.5v to +6.0v operating temperature -55 c to +125 c storage temperature -55 c to +125 c soldering temperature 260 c for 10 seconds * this is a stress rating only and functional operation of the device at these or any other conditions above those indicated in the operation sections of this specification is not implied. exposure to absolute maximum rating conditions for extended periods of time may affect reliability. recommended dc operating conditions parameter symbol condition min typ max units notes supply voltage v dd local power 3.0 5.5 v 1 data pin dq -0.3 +5.5 v 1 logic 1 v ih 2.2 v cc +0.3 v 1,2 logic 0 v il -0.3 +0.8 v 1,3,7 dc electrical characteristics (-55c to +125c; v dd =3.0v to 5.5v) parameter symbol condition min typ max units notes thermometer error t err -10c to +85c ? c -55c to +125c 2 input logic high v ih local power parasite power 2.2 3.0 5.5 v v 1,2 1,2 input logic low v il -0.3 +0.8 v 1,3,7 sink current i l v i/o =0.4v -4.0 ma 1 standby current i dds 750 1000 na 6,8 active current i dd 1 1.5 ma 4 dq-input load current i dq 5a5 ac electrical characteristics: nv memory (-55c to +125c; v dd =3.0v to 5.5v) parameter symbol condition min typ max units notes nv write cycle time t wr 210ms
ds18b20 25 of 26 ac electrical characteristics: (-55c to +125c; v dd =3.0v to 5.5v) parameter symbol condition min typ max units notes temperature conversion t conv 9-bit 93.75 ms time 10-bit 187.5 11-bit 375 12-bit 750 time slot t slot 60 120 s recovery time t rec 1s write 0 low time r low0 60 120 s write 1 low time t low1 115s read data valid t rdv 15 s reset time high t rsth 480 s reset time low t rstl 480 s 9 presence detect high t pdhigh 15 60 s presence detect low t pdlow 60 240 s capacitance c in/out 25 pf notes: 1. all voltages are referenced to ground. 2. logic one voltages are specified at a source current of 1 ma. 3. logic zero voltages are specified at a sink current of 4 ma. 4. active current refers to either temperature conversion or writing to the e 2 memory. writing to e 2 memory consumes approximately 200 a for up to 10 ms. 5. input load is to ground. 6. standby current specified up to 70 c. standby current typically is 3 a at 125 c. 7. to always guarantee a presence pulse under low voltage parasite power conditions, v ilmax may have to be reduced to as much as 0.5v. 8. to minimize i dds , dq should be: gnd dq gnd +0.3v or v dd ? 0.3v dq v dd . 9. under parasite power, the max t rstl before a power on reset occurs is 960 s.
ds18b20 26 of 26


▲Up To Search▲   

 
Price & Availability of DS18B20P

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X